package com.scanannotation;

import com.scanannotation.service.TestService1;
import com.scanannotation.service.TestService2;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class App {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new FileSystemXmlApplicationContext("classpath:spring-conf.xml");

        TestService1 service1 = applicationContext.getBean(TestService1.class);
        System.out.println("test1="+service1.test());

        TestService2 service2 = applicationContext.getBean(TestService2.class);
        System.out.println("test2="+service2.test());

        System.out.println("我们都一样");
    }
}
